/*
 Navicat MySQL Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80028
 Source Host           : localhost:3306
 Source Schema         : ob_com

 Target Server Type    : MySQL
 Target Server Version : 80028
 File Encoding         : 65001

 Date: 30/01/2023 22:32:39
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for system_auth
-- ----------------------------
DROP TABLE IF EXISTS `system_auth`;
CREATE TABLE `system_auth` (
  `id` int NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '权限名称',
  `utype` varchar(50) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '身份权限',
  `desc` varchar(500) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '备注说明',
  `sort` int DEFAULT '0' COMMENT '排序权重',
  `status` int DEFAULT '1' COMMENT '权限状态(1使用,0禁用)',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_system_auth_status` (`status`),
  KEY `idx_system_auth_title` (`title`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='系统-权限';

-- ----------------------------
-- Table structure for system_auth_node
-- ----------------------------
DROP TABLE IF EXISTS `system_auth_node`;
CREATE TABLE `system_auth_node` (
  `id` int NOT NULL AUTO_INCREMENT,
  `auth` int DEFAULT '0' COMMENT '角色',
  `node` varchar(200) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '节点',
  PRIMARY KEY (`id`),
  KEY `idx_system_auth_node_auth` (`auth`),
  KEY `idx_system_auth_node_node` (`node`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='系统-授权';

-- ----------------------------
-- Table structure for system_base
-- ----------------------------
DROP TABLE IF EXISTS `system_base`;
CREATE TABLE `system_base` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type` varchar(20) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '数据类型',
  `code` varchar(100) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '数据代码',
  `name` varchar(500) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '数据名称',
  `content` text COLLATE utf8mb4_general_ci COMMENT '数据内容',
  `sort` int DEFAULT '0' COMMENT '排序权重',
  `status` int DEFAULT '1' COMMENT '数据状态(0禁用,1启动)',
  `deleted` int DEFAULT '0' COMMENT '删除状态(0正常,1已删)',
  `deleted_at` varchar(20) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '删除时间',
  `deleted_by` int DEFAULT '0' COMMENT '删除用户',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_system_base_type` (`type`),
  KEY `idx_system_base_code` (`code`),
  KEY `idx_system_base_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='系统-字典';

-- ----------------------------
-- Table structure for system_config
-- ----------------------------
DROP TABLE IF EXISTS `system_config`;
CREATE TABLE `system_config` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type` varchar(20) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '配置分类',
  `name` varchar(100) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '配置名称',
  `value` varchar(2048) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '配置内容',
  PRIMARY KEY (`id`),
  KEY `idx_system_config_type` (`type`),
  KEY `idx_system_config_name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='系统-配置';

-- ----------------------------
-- Records of system_config
-- ----------------------------
BEGIN;
INSERT INTO `system_config` VALUES (1, 'base', 'app_name', 'Ladmin');
INSERT INTO `system_config` VALUES (2, 'base', 'app_version', 'v1');
INSERT INTO `system_config` VALUES (3, 'base', 'editor', 'ckeditor5');
INSERT INTO `system_config` VALUES (4, 'base', 'login_name', '系统管理');
INSERT INTO `system_config` VALUES (5, 'base', 'site_copy', '©版权所有 2019-2023 ladmin.cn');
INSERT INTO `system_config` VALUES (6, 'base', 'site_icon', '');
INSERT INTO `system_config` VALUES (7, 'base', 'site_name', 'Ladmin');
INSERT INTO `system_config` VALUES (8, 'base', 'site_theme', 'header');
INSERT INTO `system_config` VALUES (9, 'storage', 'allow_exts', 'doc,gif,ico,jpg,mp3,mp4,p12,pem,png,zip,rar,xls,xlsx');
INSERT INTO `system_config` VALUES (10, 'storage', 'type', 'local');
INSERT INTO `system_config` VALUES (11, 'base', 'site_host', 'http://www.padmin.com');
INSERT INTO `system_config` VALUES (12, 'base', 'login_image', '/static/theme/img/auth_banner.jpg');
INSERT INTO `system_config` VALUES (13, 'storage', 'link_type', 'none');
INSERT INTO `system_config` VALUES (14, 'storage', 'name_type', 'xmd5');
INSERT INTO `system_config` VALUES (15, 'storage', 'local_http_protocol', 'http');
COMMIT;

-- ----------------------------
-- Table structure for system_data
-- ----------------------------
DROP TABLE IF EXISTS `system_data`;
CREATE TABLE `system_data` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '配置名',
  `value` text COLLATE utf8mb4_general_ci COMMENT '配置值',
  PRIMARY KEY (`id`),
  KEY `idx_system_data_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='系统-数据';

-- ----------------------------
-- Table structure for system_file
-- ----------------------------
DROP TABLE IF EXISTS `system_file`;
CREATE TABLE `system_file` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type` varchar(20) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '上传类型',
  `hash` varchar(32) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '文件哈希',
  `name` varchar(200) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '文件名称',
  `xext` varchar(100) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '文件后缀',
  `xurl` varchar(500) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '访问链接',
  `xkey` varchar(500) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '文件路径',
  `mime` varchar(100) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '文件类型',
  `size` int DEFAULT '0' COMMENT '文件大小',
  `uuid` int DEFAULT '0' COMMENT '用户编号',
  `isfast` int DEFAULT '0' COMMENT '是否秒传',
  `issafe` int DEFAULT '0' COMMENT '安全模式',
  `status` int DEFAULT '1' COMMENT '上传状态(1悬空,2落地)',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `idx_system_file_type` (`type`),
  KEY `idx_system_file_hash` (`hash`),
  KEY `idx_system_file_uuid` (`uuid`),
  KEY `idx_system_file_xext` (`xext`),
  KEY `idx_system_file_status` (`status`),
  KEY `idx_system_file_issafe` (`issafe`),
  KEY `idx_system_file_isfast` (`isfast`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='系统-文件';

-- ----------------------------
-- Table structure for system_menu
-- ----------------------------
DROP TABLE IF EXISTS `system_menu`;
CREATE TABLE `system_menu` (
  `id` int NOT NULL AUTO_INCREMENT,
  `pid` int DEFAULT '0' COMMENT '上级ID',
  `title` varchar(100) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '菜单名称',
  `icon` varchar(100) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '菜单图标',
  `node` varchar(100) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '节点代码',
  `url` varchar(400) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '链接节点',
  `params` varchar(500) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '链接参数',
  `target` varchar(20) COLLATE utf8mb4_general_ci DEFAULT '_self' COMMENT '打开方式',
  `sort` int DEFAULT '0' COMMENT '排序权重',
  `status` int DEFAULT '1' COMMENT '状态(0:禁用,1:启用)',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_system_menu_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='系统-菜单';

-- ----------------------------
-- Records of system_menu
-- ----------------------------
BEGIN;
INSERT INTO `system_menu` VALUES (1, 0, '系统管理', '', '', '#', '', '_self', 100, 1, '2023-01-27 21:19:20');
INSERT INTO `system_menu` VALUES (2, 1, '系统配置', '', '', '#', '', '_self', 0, 1, '2023-01-27 21:19:20');
INSERT INTO `system_menu` VALUES (3, 2, '系统参数配置', 'setting', 'admin/config/index', 'admin/config/index', '', '_self', 0, 1, '2023-01-27 21:19:20');
INSERT INTO `system_menu` VALUES (4, 2, '系统任务管理', 'clock', 'admin/queue/index', 'admin/queue/index', '', '_self', 0, 1, '2023-01-27 21:19:20');
INSERT INTO `system_menu` VALUES (5, 2, '系统日志管理', 'memo', 'admin/oplog/index', 'admin/oplog/index', '', '_self', 0, 1, '2023-01-27 21:19:20');
INSERT INTO `system_menu` VALUES (6, 2, '数据字典管理', 'scale-to-original', 'admin/base/index', 'admin/base/index', '', '_self', 0, 1, '2023-01-27 21:19:20');
INSERT INTO `system_menu` VALUES (7, 2, '系统文件管理', 'files', 'admin/file/index', 'admin/file/index', '', '_self', 0, 1, '2023-01-27 21:19:20');
INSERT INTO `system_menu` VALUES (8, 2, '系统菜单管理', 'credit-card', 'admin/menu/index', 'admin/menu/index', '', '_self', 0, 1, '2023-01-27 21:19:20');
INSERT INTO `system_menu` VALUES (9, 1, '权限管理', '', '', '#', '', '_self', 0, 1, '2023-01-27 21:19:20');
INSERT INTO `system_menu` VALUES (10, 9, '访问权限管理', 'notification', 'admin/auth/index', 'admin/auth/index', '', '_self', 0, 1, '2023-01-27 21:19:20');
INSERT INTO `system_menu` VALUES (11, 9, '系统用户管理', 'user', 'admin/user/index', 'admin/user/index', '', '_self', 0, 1, '2023-01-27 21:19:20');
COMMIT;

-- ----------------------------
-- Table structure for system_oplog
-- ----------------------------
DROP TABLE IF EXISTS `system_oplog`;
CREATE TABLE `system_oplog` (
  `id` int NOT NULL AUTO_INCREMENT,
  `node` varchar(200) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '当前操作节点',
  `geoip` varchar(15) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作者IP地址',
  `action` varchar(200) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作行为名称',
  `content` varchar(1024) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作内容描述',
  `username` varchar(50) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作人用户名',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='系统-日志';

-- ----------------------------
-- Records of system_oplog
-- ----------------------------
BEGIN;
INSERT INTO `system_oplog` VALUES (1, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 19:13:15');
INSERT INTO `system_oplog` VALUES (2, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 21:11:24');
INSERT INTO `system_oplog` VALUES (3, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 21:23:13');
INSERT INTO `system_oplog` VALUES (4, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 21:28:33');
INSERT INTO `system_oplog` VALUES (5, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 21:44:52');
INSERT INTO `system_oplog` VALUES (6, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 21:46:49');
INSERT INTO `system_oplog` VALUES (7, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 21:47:46');
INSERT INTO `system_oplog` VALUES (8, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 21:48:08');
INSERT INTO `system_oplog` VALUES (9, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 21:51:07');
INSERT INTO `system_oplog` VALUES (10, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 22:08:05');
INSERT INTO `system_oplog` VALUES (11, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 22:08:34');
INSERT INTO `system_oplog` VALUES (12, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 22:08:59');
INSERT INTO `system_oplog` VALUES (13, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 22:10:35');
INSERT INTO `system_oplog` VALUES (14, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 22:11:03');
INSERT INTO `system_oplog` VALUES (15, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 22:11:30');
INSERT INTO `system_oplog` VALUES (16, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 22:11:40');
INSERT INTO `system_oplog` VALUES (17, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 22:21:53');
INSERT INTO `system_oplog` VALUES (18, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 22:27:46');
INSERT INTO `system_oplog` VALUES (19, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 22:29:59');
INSERT INTO `system_oplog` VALUES (20, 'admin/login/index', '172.18.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2023-01-30 22:30:45');
COMMIT;

-- ----------------------------
-- Table structure for system_queue
-- ----------------------------
DROP TABLE IF EXISTS `system_queue`;
CREATE TABLE `system_queue` (
  `id` int NOT NULL AUTO_INCREMENT,
  `code` varchar(20) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '任务编号',
  `title` varchar(100) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '任务名称',
  `command` varchar(500) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '执行指令',
  `exec_pid` int DEFAULT '0' COMMENT '执行进程',
  `exec_data` text COLLATE utf8mb4_general_ci COMMENT '执行参数',
  `exec_time` int DEFAULT '0' COMMENT '执行时间',
  `exec_desc` varchar(500) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '执行描述',
  `enter_time` decimal(20,4) DEFAULT '0.0000' COMMENT '开始时间',
  `outer_time` decimal(20,4) DEFAULT '0.0000' COMMENT '结束时间',
  `loops_time` int DEFAULT '0' COMMENT '循环时间',
  `attempts` int DEFAULT '0' COMMENT '执行次数',
  `rscript` int DEFAULT '1' COMMENT '任务类型(0单例,1多例)',
  `status` int DEFAULT '1' COMMENT '任务状态(1新任务,2处理中,3成功,4失败)',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_system_queue_code` (`code`),
  KEY `idx_system_queue_title` (`title`),
  KEY `idx_system_queue_status` (`status`),
  KEY `idx_system_queue_rscript` (`rscript`),
  KEY `idx_system_queue_create_at` (`create_at`),
  KEY `idx_system_queue_exec_time` (`exec_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='系统-任务';

-- ----------------------------
-- Table structure for system_user
-- ----------------------------
DROP TABLE IF EXISTS `system_user`;
CREATE TABLE `system_user` (
  `id` int NOT NULL AUTO_INCREMENT,
  `usertype` varchar(20) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '用户类型',
  `username` varchar(50) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '用户账号',
  `password` varchar(32) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '用户密码',
  `nickname` varchar(50) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '用户昵称',
  `headimg` varchar(255) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '头像地址',
  `authorize` varchar(255) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '权限授权',
  `contact_qq` varchar(20) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '联系QQ',
  `contact_mail` varchar(20) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '联系邮箱',
  `contact_phone` varchar(20) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '联系手机',
  `login_ip` varchar(255) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '登录地址',
  `login_at` varchar(20) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '登录时间',
  `login_num` int DEFAULT '0' COMMENT '登录次数',
  `describe` varchar(255) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '备注说明',
  `status` int DEFAULT '1' COMMENT '状态(0禁用,1启用)',
  `sort` int DEFAULT '0' COMMENT '排序权重',
  `is_deleted` int DEFAULT '0' COMMENT '删除(1删除,0未删)',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_system_user_status` (`status`),
  KEY `idx_system_user_username` (`username`),
  KEY `idx_system_user_is_deleted` (`is_deleted`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='系统-用户';

-- ----------------------------
-- Records of system_user
-- ----------------------------
BEGIN;
INSERT INTO `system_user` VALUES (10000, '', 'admin', '21232f297a57a5a743894a0e4a801fc3', '超级管理员', '/static/theme/img/user.png', '', '', '', '', '172.18.0.1', '2023-01-30 22:30:45', 20, '', 1, 0, 0, '2023-01-27 21:19:20');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
